name: test
resources:
  cpus: 0.5+

num_nodes: 1

file_mounts:
  /mnt/region:
    name: {{existing_disk_name}}
    store: volume
    source: ~/.ssh/id_rsa.pub
    persistent: true
  {% if mig_config %}
    config:
      attach_mode: read_only
  {% endif %}
  /mnt/ab:
    name: {{new_disk_name}}
    store: volume
    source: ~/tmp-workdir
    config:
      size: 10
{% if not mig_config %}
  /mnt/cd:
    name: local-ssd0
    store: volume
    source: ~/.ssh/id_rsa.pub
    config:
      storage_type: instance
{% endif %}
  /mnt/ef:
    store: volume
    source: ~/tmp-workdir
    config:
      storage_type: instance

setup: |
  echo "running setup"

run: |
  set -x
  set -e
  
  df -h /mnt/region
  ls /mnt/region/data
{% if not tpu_config %}
  df -h /mnt/ef
  df -h /mnt/ab
  ls /mnt/ef/data/
  ls /mnt/ab/data/
{% endif %}
{% if not mig_config and not tpu_config %}
  df -h /mnt/cd
  ls /mnt/cd/data
{% endif %}

{% if mig_config %}
config:
  gcp:
    managed_instance_group:
      run_duration: 36000
      provision_timeout: 900
{% endif %}
